package ArrayListShiLi;

import java.util.ArrayList;

public class ListStudy {
    public static void main(String[] args) {
        ArrayList<Student> students=new ArrayList<>();
        Student student1=new Student();
        student1.setId(1);
        student1.setName("ss");
        student1.setScores(33.3);
        Student student2=new Student();
        student2.setId(2);
        student2.setName("ww");
        student2.setScores(99.9);
        students.add(student1);
        students.add(student2);
        for (Student stu:students){
            System.out.print("学生id: " + stu.getId()+"\t");
            System.out.print("学生姓名：" + stu.getName()+"\t");
            System.out.println("学生成绩：" + stu.getScores());

        }
    }
}
